<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN"> 
<head>
	<!-- INCLUDE meta.html -->
    <script src="js/jquery/jquery.js" ></script>
    <style>
	img.img
	{
		cursor:pointer;
		padding:4px;
	}
	img.checked_img
	{
		background-color:#26F;
	}
	.float_item
	{
		width:140px;
		height:160px;
		margin:5px;
		float:left;
	}
	</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
<div class='main'>

<div class="headerdiv">
	<!-- INCLUDE header.html -->
</div>

<div id='content'>
	<div id='left' >
		<div style="margin:5px;margin-top:30px;">
			<ul>
		    	<li><a href="?p=photo_unpublished&time=10">{TEN_M_AGO}</a></li>
		    	<li><a href="?p=photo_unpublished&time=60">{ONE_H_AGO}</a></li>
		        <li><a href="?p=photo_unpublished&time=all">{ALL_IMAGES}</a></li>
		    </ul>

		</div>
    </div>
    <div id='maindiv'>
    	<div class="description">
			{page_description}
        </div>
        
        <div class="real_content">
        <!-- IF page_content -->
        	{page_content}
        <!-- ELSE -->
        	<!-- IF image_list -->
        	<div class="toolbar">
       	 		<button onclick="edit_images()">{EDIT}</button>&nbsp;
       	 		<button onclick="delete_images()">{DELETE}</button>&nbsp;
       		    <button onclick="check_all();">{CHECK_ALL}</button>&nbsp;
            	<button onclick="inverse();">{CHECK_ANTI}</button> 
            </div>
        	<!-- INCLUDE photo_images.html -->
        	<div class="toolbar">
       	 		<button onclick="edit_images()">{EDIT}</button>&nbsp;
       	 		<button onclick="delete_images()">{DELETE}</button>&nbsp;
       		    <button onclick="check_all();">{CHECK_ALL}</button>&nbsp;
            	<button onclick="inverse();">{CHECK_ANTI}</button> 
            </div>
            <!-- ELSE -->
            <div class="notice_button">
            	{NO_UNPUBLISHED}
            </div>
            <!-- ENDIF -->
        <!-- ENDIF -->
        </div>
        
    </div>
</div>

<div style="display:none;z-index:1000;width:520px;height:520px;background-color:#202020;position:absolute;" id="preview_div">
</div>


<script>
function edit_images()
{
	var ids = get_checked();
	if (ids == '')
	{
		alert('{NO_CHECKED_IMAGES}');
		return;
	}
	window.location = "admin.php?p=photo_edit&ids="+ids;
}

function delete_images(ids)
{
	if (!ids) ids = get_checked();
	if (ids == '')
	{
		alert('{NO_CHECKED_IMAGES}');
		return;
	}
	if (!confirm('{DELETE_COMFIRM}')) return;
	$.post("admin.php?p=ajax&m=delete&table=photo&ids="+ids,{ },function(ids)
	{
		var arr = ids.split(',');
		for(i=0;i<arr.length;i++)
		{
			$('#img_img_'+arr[i]).parents('.float_item').fadeOut('fast',function()
			{
				this.parentNode.removeChild(this);
			});
		}
	});
}
load('view/admin/js/photo.js');
</script>
<!-- INCLUDE footer.html -->

</div>
</body>
</html>
